<!--
 * @Author: daidai
 * @Date: 2022-03-04 09:23:59
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-05-07 11:05:02
 * @FilePath: \web-pc\src\pages\big-screen\view\indexs\index.vue
-->
<template>
  <div class="contents">
    <div class="contetn_left">
      <div class="pagetab">
      </div>
      <ItemWrap class="contetn_left-top contetn_lr-item" title="资产总览"
       @click.native="showAssetOverviewList">
        <LeftTop />
      </ItemWrap>
      <ItemWrap class="contetn_left-center contetn_lr-item" title="设备资产运维情况"
      @click.native="assetEquiStatusList">
        <LeftCenter />
      </ItemWrap>
      <ItemWrap class="contetn_left-bottom contetn_lr-item" title="空间资产信息"
      @click.native="assetBuildStatusList" style="padding: 0 10px 16px 10px">
        <LeftBottom />
      </ItemWrap>
    </div>
    <div class="contetn_center">
      <ItemWrap class="contetn_left-bottom contetn_lr-item" title="空间资产价值排名(TOP6)"
       style="padding: 0 10px 16px 10px" @click.native="assetOverviewTopList">
        <CenterTop />
      </ItemWrap>
      <ItemWrap class="contetn_left-bottom contetn_lr-item" title="设备资产类别情况"
      @click.native="assetEquiStatusList" style="padding: 0 10px 16px 10px">
        <CenterCenter />
      </ItemWrap>
      <ItemWrap class="contetn_center-bottom" title="岗位人员情况" @click.native="showUserList">
        <CenterBottom />
      </ItemWrap>
    </div>
    <div class="contetn_right">
      <ItemWrap class="contetn_left-bottom contetn_lr-item" title="空间资产运营情况"
      @click.native="assetBuildStatusList">
        <RightTop />
      </ItemWrap>
      <ItemWrap class="contetn_left-bottom contetn_lr-item" title="合同概况" 
      style="padding: 0 10px 16px 10px" @click.native="showContractList">
        <RightCenter />
      </ItemWrap>
      <ItemWrap class="contetn_left-bottom contetn_lr-item" title="合同预警（三个月内到期）"
      @click.native="reminderContractList">
        <RightBottom />
      </ItemWrap>
    </div>
    <AssetList ref="assetList"/>
    <ContractList ref="contractList"/>
    <UserList ref="userList"/>
  </div>
</template>

<script>
import LeftTop from './left-top.vue'
import LeftCenter from "./left-center.vue";
import LeftBottom from "./left-bottom.vue";
import CenterTop from "./center-top.vue";
import CenterCenter from "./center-center.vue";
import CenterBottom from "./center-bottom.vue";
import RightTop from "./right-top.vue";
import RightCenter from "./right-center.vue";
import RightBottom from "./right-bottom.vue";
import AssetList from "../modules/AssetList.vue";
import ContractList from '../modules/ContractList.vue';
import UserList from '../modules/UserList.vue';

export default {
  components: {
    LeftTop,
    LeftCenter,
    LeftBottom,
    RightTop,
    RightCenter,
    RightBottom,
    CenterTop,
    CenterBottom,
    CenterCenter,
    AssetList,
    ContractList,
    UserList
  },
  data() {
    return {
        url: {
          assetList: "/asset/Statistics/list",
          assetTopList: "/asset/Statistics/topList",
          contractList: "/asset/Statistics/contractList",
          reminderContractList: "/asset/Statistics/reminderContractList",
        }
    };
  },
  filters: {
    numsFilter(msg) {
      return msg || 0;
    },
  },
  created() {
  },

  mounted() { },
      methods: {
    // 显示资产总览列表
    showAssetOverviewList() {
      this.$refs.assetList.show(this.url.assetList);
    },
    assetOverviewTopList() {
      this.$refs.assetList.show(this.url.assetTopList);
    },
    assetBuildStatusList() {
      this.$refs.assetList.show(this.url.assetList, { type: '1' });
    },
    assetEquiStatusList() {
      this.$refs.assetList.show(this.url.assetList, { type: '2' });
    },
    showContractList() {
      this.$refs.contractList.show(this.url.contractList);
    },
    reminderContractList() {
      this.$refs.contractList.show(this.url.reminderContractList);
    },
    showUserList() {
      this.$refs.userList.show();
    },
  },
};
</script>
<style lang="scss" scoped>
/* 保持原有样式，并添加弹窗样式 */
.asset-overview-dialog {
  .el-dialog__body {
    height: 70vh;
    overflow-y: auto;
  }
}
// 内容
.contents {

  .contetn_left,
  .contetn_right {
    width: 540px;
    box-sizing: border-box;
    // padding: 16px 0;
  }

  .contetn_center {
    width: 720px;
  }

  //左右两侧 三个块
  .contetn_lr-item {
    height: 310px;
  }

  .contetn_center_top {
    width: 100%;
  }

  // 中间
  .contetn_center {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
  }

  .contetn_center-bottom {
    height: 315px;
  }

  //左边 右边 结构一样
  .contetn_left,
  .contetn_right {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    position: relative;


  }
}


@keyframes rotating {
  0% {
    -webkit-transform: rotate(0) scale(1);
    transform: rotate(0) scale(1);
  }

  50% {
    -webkit-transform: rotate(180deg) scale(1.1);
    transform: rotate(180deg) scale(1.1);
  }

  100% {
    -webkit-transform: rotate(360deg) scale(1);
    transform: rotate(360deg) scale(1);
  }
}
</style>
